package cn.hdustea.shopNavigation.ui.model

import cn.hdustea.shopNavigation.entity.Beauty
import cn.hdustea.shopNavigation.entity.Mall
import cn.hdustea.shopNavigation.net.MyService
import cn.hdustea.shopNavigation.ui.contract.MallSearchContract
import com.hdustea.base.base.BaseModel
import com.hdustea.base.net.BaseCallback
import com.hdustea.base.net.BaseObserver





class MallSearchModel : BaseModel(), MallSearchContract.Model {

    override fun getSearchList(keyword: String, callback: BaseCallback<MutableList<Mall>>) {
        changeThread(MyService.mallSearchService().getSearch(keyword),
                object : BaseObserver<MutableList<Mall>>(callback) {
                    override fun onNext(t: MutableList<Mall>) {
                        callback.callback(t)
                    }
                })
    }

}